﻿namespace Resharper.Abstractions.Daemons
{
  using System;
  using JetBrains.Annotations;
  using JetBrains.DocumentModel;
  using JetBrains.Util;

  /// <summary>Defines the <see cref="CanFixContext"/> class.</summary>
  public class CanFixContext
  {
    #region Constructors and Destructors

    /// <summary>Initializes a new instance of the <see cref="CanFixContext"/> class.</summary>
    /// <param name="cache">The cache.</param>
    /// <param name="document">The document.</param>
    internal CanFixContext([NotNull] IUserDataHolder cache, IDocument document)
    {
      if (cache == null)
      {
        throw new ArgumentNullException("cache");
      }

      this.Cache = cache;
      this.InternalDocument = document;
    }

    #endregion

    #region Properties

    /// <summary>The cache field.</summary>
    internal IUserDataHolder Cache { get; private set; }

    /// <summary>
    /// Gets the internal document.
    /// </summary>
    internal IDocument InternalDocument { get; private set; }

    #endregion
  }
}